package exception;

public class TryCatchDame {
    public static void main(String[] args) {
        System.out.println("程序开始了");
        try{
            String s = "null";
            System.out.println(s.length());
            System.out.println(s.charAt(6));
            System.out.println(1111);
        }
//        catch (NullPointerException e){
//            System.out.println("问题解决了");
//        }catch (StringIndexOutOfBoundsException e){
//            System.out.println("解决了");
//        }
        catch (StringIndexOutOfBoundsException | NullPointerException e){
            System.out.println("解决了");
        }catch (Exception e){
            System.out.println("okokokkokokokookokokookkkook");
        }
        System.out.println("程序结束了");
    }
}
